TECCountSubTextEncodings
Counts and returns the number of subencodings a text encoding supports.
pascal OSStatus TECCountSubTextEncodings (
TextEncoding inputEncoding,
ItemCount *numberEncodings);inputEncoding
- The text encoding specification containing the subencodings.
numberEncodings
- A pointer to a value of type
ItemCount
. On output, this value indicates the number of currently supported subencodings.- function result
- A result code. See "Text Encoding Conversion Manager Result Codes" (page 42) for a list of possible values. If other than
noErr
, then one of the text conversion plug-ins encountered an error when polled by the Text Encoding Converter.DISCUSSION
TheTECCountSubTextEncodings
function counts and returns the number of subencodings that you can use to perform conversions based on the current configuration of the Text Encoding Converter. Subencodings are text encodings that are embedded as part of a larger text encoding specification. For example, EUC-JP contains JIS Roman or ASCII, JIS X0208, JIS X0212, and half-width Katakana from JIS X0201. Not every encoding that can be broken into multiple encodings necessarily supports this routine. It's up to the plug-in developer to decide which encodings might be useful to break up. Subencodings are not the same as text encoding variants.The
numberEncodings
value returned tells you what size array you must allocate in a parameter of the functionTECGetSubTextEncodings
(page 69). Therefore, you should call this function before you callTECGetSubTextEncodings
in order to accommodate the specifications for all of these text encodings.If an encoding can be converted to multiple runs of encodings (as indicated by a destination base encoding of
kTextEncodingMultiRun
), you can call the functionTECGetSubTextEncodings
to get the list of output encodings. See the descriptions of theTECCreateOneToManyConverter
(page 99) andTECGetDestinationTextEncodings
(page 74) for information about multiple output encoding run conversions.